/*
 * ServerUser.h
 *
 *  Created on: 2010-05-28
 *      Author: mateusz
 */

#ifndef SERVERUSER_H_
#define SERVERUSER_H_

#include <ClanLib/core.h>
#include <ClanLib/network.h>

/**
 * Client podlaczony do serwera
 */

class ServerUser {
public:
	ServerUser();
	virtual ~ServerUser();

	static ServerUser *getUser(CL_NetGameConnection* connection);
	void attachToConnection(CL_NetGameConnection *connection);

	/**
	 * Wysyła event do tego clienta
	 */
	void sendEvent(const CL_NetGameEvent &gameEvent);

	int id;
private:
	CL_NetGameConnection *connection;
};

#endif /* SERVERUSER_H_ */
